package com.xxxx.Utils

import org.apache.spark.{SparkConf, SparkContext}

/**
 * @program: day0311
 * @description: 尽信书，则不如无书
 * @author: CoreDao
 * @create: 2021-03-11 15:11
 * */

object ContextUtils {

  def getSparkContext(appName:String=this.getClass.getSimpleName,master:String="local[*]"):SparkContext={
    new SparkContext(new SparkConf().setMaster(master).setAppName(appName))
  }

}
